#include "items/item.hh"
#include "locations/location.hh"
#include "locations/office.hh"

#include <string>

Office::Office() : office_visited(false) {}

std::string Office::getName() const {
    return "Professor's Office";
}

std::string Office::getDescription() const {
    return "A place where professor's diaries and important clues are stored.";
}

std::string Office::when_enter() {
    this->office_visited = true;
    return "You entered the professor's office.";
}


Player& Office::in(Player& a){
    if (a.success==true){
        std::cout<<"You've already been to this office."<<std::endl;
    } else{
        Item* new_item = new Item("IDCard","It's a pass to leave here.", "Tool", 30, 0, 0, 0, false, true);
        std::cout << "You searched the office and found a IDcard. ";
        a.addToInventory(new_item);
        a.success=true;
        std::cout<<std::endl;
    }  
    return a;
}

std::string Office::when_exit() const {
    return "You exited the professor's office.";
}